Skip to content

Fix SIVACOR Part B generation for revisions#84

Merged
larsvilhuber merged 3 commits into
developmentfrom
dm/fix-sivacor-partb-generation
Jun 25, 2026
Merged

Fix SIVACOR Part B generation for revisions#84
larsvilhuber merged 3 commits into
developmentfrom
dm/fix-sivacor-partb-generation

Conversation

@dmcguir5

Copy link
Copy Markdown
Collaborator

Closes issue #83

-Fixes SIVACOR part B generation for revision reports, preserves functionality for non-revision reports
-Writes part B under generated/
-Correctly writes SIVACOR appendix through appendix template
-Removes redundant/duplicated scripts
-Supports python/python3

Comment thread docs/tools/repository/96-90-get_sivacor_info.md Outdated
Comment thread automations/24_amend_report.sh Outdated
Comment thread template/REPLICATION-PartB-sivacor.md Outdated

@larsvilhuber larsvilhuber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made a few notes targeting better/easier maintenance going forward. Can you address them?

@dmcguir5

Copy link
Copy Markdown
Collaborator Author

@larsvilhuber Addressed the review feedback: replaced Python 3.12-specific references with python3, removed the Perl dependency, and consolidated the SIVACOR placeholders into the main REPLICATION.md template. Normal and SIVACOR generation paths were tested successfully. Ready for re-review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes SIVACOR Part B generation for revision (single-file) reports by switching to placeholder-based insertion into REPLICATION.md/appendix templates, ensuring outputs land under generated/, and removing redundant Part B/appendix insertion scripts.

Changes:

  • Rework SIVACOR Part B generation to fill placeholders in REPLICATION.md (and include appendix content via template/REPLICATION_appendix.md) rather than directly editing regenerated artifacts.
  • Standardize outputs under generated/ and ensure non-SIVACOR runs get empty SIVACOR snippet files so placeholders resolve cleanly.
  • Improve portability by using python3/python detection and updating docs/examples accordingly.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/update_sivacor_appendix.py Removed direct appendix mutation helper (appendix now assembled via template placeholder).
tools/replace_placeholders.py Makes chardet optional (fallback to UTF-8 if unavailable).
tools/insert_sivacor_partb_sections.py Removed bespoke Part B insertion script (replaced by placeholder fill).
tools/get_sivacor_info.py Uses python3 shebang; updates example output path to generated/.
tools/generate_sivacor_partb.sh Generates SIVACOR snippet files + fills placeholders to produce generated/REPLICATION-PartB-SIVACOR.md.
template/REPLICATION_appendix.md Adds {{ sivacor-partb-appendix.md }} include point.
REPLICATION.md Adds SIVACOR placeholders for computing environment, replication steps, and findings.
docs/tools/repository/96-90-get_sivacor_info.md Updates workflow/docs for new filenames and revision/split behavior.
docs/tools/index.md Updates tool description for new output locations and appendix snippet behavior.
docs/automations/index.md Updates automation description for new generation/apply behavior.
docs/96-91-pipeline-overview.md Updates pipeline overview text to match new SIVACOR behavior.
automations/24_amend_report.sh Ensures SIVACOR snippet placeholders resolve (creates empty files if missing); uses $PYTHON.
automations/18_summarize_sivacor.sh Uses $PYTHON, generates Part B from REPLICATION.md, and supports replace-report for revisions.

Comment on lines 109 to +117
if [[ "$dry_run" != "--dry-run" ]]
then
mkdir -p "$output_dir"
fi

python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-computing-environment --output "$environment_output" $dry_run
python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-replication-steps --output "$steps_output" $dry_run
python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-findings --output "$findings_output" $dry_run
python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-appendix --output "$appendix_output" $dry_run
"$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-computing-environment --output "$environment_output" $dry_run
"$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-replication-steps --output "$steps_output" $dry_run
"$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-findings --output "$findings_output" $dry_run
"$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-appendix --output "$appendix_output" $dry_run
Comment thread automations/24_amend_report.sh Outdated
@larsvilhuber

Copy link
Copy Markdown
Member

@dmcguir5 can you have a look at the second comment by the AI review? Ignore the first one, for now.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@larsvilhuber larsvilhuber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All set for now.

@larsvilhuber larsvilhuber merged commit d8e9d54 into development Jun 25, 2026
1 check passed
@larsvilhuber larsvilhuber deleted the dm/fix-sivacor-partb-generation branch June 25, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants